package org.file5.service;

import java.util.List;

import org.file5.domain.Article;
import org.file5.domain.BaseEntity;
import org.file5.domain.BaseEntity.STATUS;
import org.file5.domain.Category;
import org.file5.domain.EntityComment;
import org.file5.util.DataBean;

public interface ArticleService {

//	public StockPrice findTestStockPrice(String symbol);
	/**
	 * Gets list of Article
	 * 
	 * @param startPosition
	 * @param maxResult
	 * @param params
	 *            supported Parameters: Category object,STATUS object,
	 * 
	 * @return
	 */
	public DataBean<Article> getArticles(int startPosition, int maxResult,
			Category category,STATUS status);
	public DataBean<Article> getArticlesByProperties(int startPosition, int maxResult,final Object ...params);

	public List<Category> getArticleCategories(Article article);

	public Article addUpdateReprintArticle(Article article,String authorBlogUrl,String authorEmail,String articleUid);

	public boolean isArticleManager(Article article, String personUid);

	public Article setArticleGeneralPrimaryCategory(Article article, Category g);
	public Article setArticlePrimaryCategory(Article article, Category g);
	public Article delArticle2Categories(String articleUid,String[] categoryUids);
	public Article addArticle2Categories(String articleUid,String[] categoryUids);
	public Article addArticle2Categories(Article article ,List<Category> categories);
	public void delete(String uid);
	public Article find(String uid,boolean withRelatedDetail);
	public Article updateStatus( String uid,	BaseEntity.STATUS status);
	
	public EntityComment<Article> addComment(String articleUid,String parentCommentUid,String comment,String authorUid);
	public DataBean<EntityComment> getArticleComments(int startPosition, int maxResult,String articleUid,String parentCommentUid);
}
